import request from '@/utils/request';

export function getMenus(params) {
  return request({
    url: 'loginController.do?getMenuMap&oa=no',
    // url: 'loginController.do?getMenuMap&oa=no#/home',
    method: 'get',
    params,
  });
}

export function getYears(params) {
  return request({
    url: 'homePageController.do?getYears',
    method: 'get',
    params,
  });
}
export function getWeeks(params) {
  return request({
    url: 'homePageController.do?getWeeks',
    method: 'get',
    params,
  });
}
export function getWeekReport(params) {
  return request({
    url: 'homePageController.do?getWeekReport',
    method: 'get',
    params,
  });
}

export function getWeekly(params) {
  return request({
    url: 'homePageController.do?getWeekly',
    method: 'get',
    params,
  });
}

export function getMonths(params) {
  return request({
    url: 'homePageController.do?getMonths',
    method: 'get',
    params,
  });
}
export function getMonthReport(params) {
  return request({
    url: 'homePageController.do?getMonthReport',
    method: 'get',
    params,
  });
}
export function getMonthly(params) {
  return request({
    url: 'homePageController.do?getMonthly',
    method: 'get',
    params,
  });
}
export function login(params) {
  return request({
    url: 'loginController.do?checkuser&oa=no',
    method: 'get',
    params,
  });
}
// 单点登录
export function singleLogin(params) {
  return request({
    url: 'loginController.do?checkuserOa',
    method: 'get',
    params,
  });
}
export function getUsername(params) {
  return request({
    url: 'loginController.do?getUsername',
    method: 'get',
    params,
  });
}

export default {
  getYears,
  getWeeks,
  getWeekReport,
  getWeekly,
  getMenus,
};
